<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for</title>
    <style>
        [v-cloak] {
            display: none;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        div {
            width: 300px;
            height: 40px;
            margin: 100px auto;
            background: #000;
            border-radius: 20px;
            padding: 5px;
        }

        div>p {
            position: relative;
            width: 30%;
            height: 100%;
            background: rgb(11, 154, 210);
            border-radius: 15px;
            transition: all .6s;
            margin-bottom: 50px;
        }

        p>span {
            position: absolute;
            right: -30px;
            bottom: -30px;
        }
    </style>
</head>

<body>
    <div v-cloak>
        <p :style="{width: pWidth +'%'}">
            <span>{{pWidth+'%'}}</span>
        </p>
        <button @click="pWidth=30">30</button>
        <button @click="pWidth=60">60</button>
        <button @click="pWidth=90">80</button>
        <button @click="pWidth=100">100</button>
    </div>

    <script src="./js/dev/vue.js"></script>
    <script>
        const app = new Vue({
            el: 'div',
            data: {
                pWidth: 30
            }
        })
    </script>
</body>

</html>